import { http } from "@/utils/request";

/**
 * @description 获取项目概览
 */
export const getProjectOverview = (id: string): Promise<any> => {
  return http.get(`/project/${id}`);
};

/**
 * @description 保存定义的页面配置
 */
export const saveProjectConfig = (params: any): Promise<any> => {
  return http.post(`/pageConfig/save`, params);
};

/**
 * @description 查询公共自定义的页面配置 -- 通过key shapeConfig
 */
export const getProjectConfig = (key: string): Promise<any> => {
  return http.get(`/pageConfig/${key}`);
};

/**
 * @description 查询公共自定义的页面配置  -- 通过项目id
 */
export const getProjectConfigById = (id: string): Promise<any> => {
  return http.get(`/pageConfig/byId/${id}`);
};
